<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>添加</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/validate.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/asyncDoSubmitForm.js"></script>
	<style type="text/css">
		.checkbox_label{
			font-weight: 500 !important;
			margin-right: 10px !important;
			margin-left: 10px !important;
		}
	</style>
</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box" >
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<fieldset>
							<input type="hidden" id="asyncResult" name="asyncResult" value="-1" /> 
							<input type="hidden" id="asyncResultData" name="asyncResultData" value="-1" /> 
							<input type="hidden" id="asyncResultError" name="asyncResultError" value="-1" />
							<form:form id="inputForm" name="form1" class="form-horizontal" method="post" action="addWebHelpFindHouse.do" modelAttribute="WebHelpFindHouse">
								<div class="row">
									<div class="col-md-12 col-sm-12 col-xs-12" >
										<input type="hidden" id="id" name="id" value="${entity.id}" /> 
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">姓名:<span style="color: red">*</span></label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.name}" name="name" id="name"  placeholder="姓名"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">手机:<span style="color: red">*</span></label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.phone}" name="phone" id="phone"  placeholder="手机"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">邮箱:<span style="color: red">*</span></label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.email}" name="email" id="email"  placeholder="邮箱"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">投资目的:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${investment_objective_list}" varStatus="abc">
													<label><input type="checkbox" name="investmentObjective" class="checkbox_label" <c:if test="${fn:contains(entity.investmentObjective, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">资金来源:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${capital_source_list}" varStatus="abc">
													<label><input type="checkbox" name="capitalSource" class="checkbox_label" <c:if test="${fn:contains(entity.capitalSource, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">房型倾向:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${tendency_room_list}" varStatus="abc">
													<label><input type="checkbox" name="tendencyRoom" class="checkbox_label" <c:if test="${fn:contains(entity.tendencyRoom, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">地点倾向:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${city_list}" varStatus="abc">
													<label><input type="checkbox" name="tendencySite" class="checkbox_label" <c:if test="${fn:contains(entity.tendencySite, item.chineseName)}"> checked="checked"</c:if> value="${item.chineseName}">${item.chineseName}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">价格倾向:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${tendency_price_list}" varStatus="abc">
													<label><input type="checkbox" name="tendencyPrice" class="checkbox_label" <c:if test="${fn:contains(entity.tendencyPrice, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">面积倾向:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${tendency_size_list}" varStatus="abc">
													<label><input type="checkbox" name="tendencySize" class="checkbox_label" <c:if test="${fn:contains(entity.tendencySize, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">学校倾向:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<c:forEach var="item" items="${tendency_school_list}" varStatus="abc">
													<label><input type="checkbox" name="tendencySchool" class="checkbox_label" <c:if test="${fn:contains(entity.tendencySchool, item.name)}"> checked="checked"</c:if> value="${item.name}">${item.name}</label>
												</c:forEach>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">留言:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.message}" name="message" id="message"  placeholder="留言"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">是否开启:<span style="color: red">*</span></label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<select name="status" id="status" class="form-control input-sm">
													<option value="true" <c:if test="${entity.status==true }">selected="selected"</c:if>>是</option>
													<option value="false" <c:if test="${entity.status==false }">selected="selected"</c:if>>否</option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">是否已查看:<span style="color: red">*</span></label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<select name="isView" id="isView" class="form-control input-sm">
													<option value="true" <c:if test="${entity.isView==true }">selected="selected"</c:if>>是</option>
													<option value="false" <c:if test="${entity.isView==false }">selected="selected"</c:if>>否</option>
												</select>
											</div>
										</div>
									</div>
								</div>
							</form:form>
						</fieldset>
					</div>
				</div>
			</div>
		</div>
	</div>
<script type="text/javascript">
var result = 0;
var validateForm;
$(document).ready(function() {
	validateForm = $("#inputForm").validate({
		rules : {
			name : {
				required : true
			},
			phone : {
				required : true
			},
			email : {
                email : true
			},
			status : {
				required : true
			},
			isView : {
				required : true
			}
		},
		messages : {
			name : {
				required : "姓名不能为空"
			},
			phone : {
				required : "手机不能为空"
			},
			email : {
                email : "邮箱格式不正确"
			},
			status : {
				required : "是否开启不能为空"
			},
			isView : {
				required : "是否已经查看不能为空"
			}
		},
		errorElement : "em",
		errorClass : "validate_error",
		submitHandler: function(form) { //通过之后回调
		},
		invalidHandler: function(form, validator) {
			return false;
		}
	});
});

</script>	
</body>
</html>